package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    int query4Count(QueryObject qo);

    List<Employee> query4List(QueryObject qo);

    void changeState(Long empId);

    Employee getUsername(String username);

    void insertRoleRelation(@Param("entityId") Long entityId,
                            @Param("roleId") Long roleId);

    List<Long> selectRoleByEmpId(Long empId);

    void deleteRoleRelation(Long employeeId);
}